# -*- coding: utf-8 -*-


class Solution(object):
    def hammingWeight(self, n):
        """
        :type n: int
        :rtype: int
        """
        
        
sss =  Solution()
qqq = sss.romanToInt("IV")          
        
# =============================================================================
# import re
# class Solution:
#     def romanToInt(self, s):
#         """
#         :type s: str
#         :rtype: int
#         """
#         I='1'
#         V='5'
#         X='10'
#         L='50'
#         C='100'
#         D='500'
#         M='1000'
#         my_dict = {I:'1',V:'5',X:'10',L:'50',C:'100',D:'500',M:'1000'}
# =============================================================================   
# =============================================================================
# class Solution(object):
#     def romanToInt(self, s):
#         """
#         :type s: str
#         :rtype: int
#         """
#         sum=0
#         convert={'M': 1000,'D': 500 ,'C': 100,'L': 50,'X': 10,'V': 5,'I': 1} 
#         aaa = s[1]
#         for i in range(len(s)-1):
#             if convert[s[i]]<convert[s[i+1]]:  #  防止这个s[i+1]溢出,
#                 sum=sum-convert[s[i]]
#             else:
#                 sum=sum+convert[s[i]]
#         return sum+convert[s[-1]] # 这个为了防止index溢出
# 
# sss =  Solution()
# qqq = sss.romanToInt("IV")   
# =============================================================================  
# =============================================================================
# class Solution:
#     def isPowerOfThree(self, n):
#         """
#         :type n: int
#         :rtype: bool
#         """
#         import math
#         if n > 0:
#             if 3 ** int(math.log(n, 3)) == n:
#                 return True
#         else:
#             return False
# import math
# aaa = int(math.log(243, 3))
# 
# sss =  Solution()
# qqq = sss.isPowerOfThree(27)   
# =============================================================================
# =============================================================================
# def countPrime(n):
#     if n < 2:
#         return 0
#     prime = [1] * n
#     prime[0] = prime[1] = 0
#     for i in range(2, int(n**0.5) +1):
#         if prime[i] == 1:
#             prime[i*i:n:i] = [0]*len(prime[i*i:n:i])
#     return sum(prime)
# 
# sss =  countPrime(30)
# print(sss)
# =============================================================================

# =============================================================================
# class Solution:
#     def fizzBuzz(self, n):
#         """
#         :type n: int
#         :rtype: List[str]
#         """
#         l = []
#         for i in range(1,n+1):
#             if i%3 == 0 and i%5==0:
#                 l.append('FizzBuzz')
#             elif i%3 == 0:
#                 l.append('Fizz')
#             elif i%5 == 0:
#                 l.append('Buzz')
#             else:
#                 l.append(str(i))
#         return l
#             
#         
# sss =  Solution()
# qqq = sss.fizzBuzz(3)
# =============================================================================
